# Replication files for _A Case for Pay-as-Bid Auctions_
#### Authors: Marek Pycia and Kyle Woodward

_README updated 2025-07-21_

This directory contains all data and scripts necessary to replicate findings on the historical spread between primary and secondary market prices for U.K. Conventional Gilts. The data files are sourced directly from the [U.K. DMO](https://www.dmo.gov.uk/data/pdfdatareport?reportCode=D2.1A) and [Tradeweb Insite](https://reports.tradeweb.com/closing-prices/gilts/) (free registration is required); a single iPython notebook collates the data and computes statistics.

## Data

* `20230322 - Gilt Issuance History.xls`: official U.K. DMO Conventional Gilt issuance statistics
* `20230322 - Gilt Issuance History.csv`: comma-separated conversion of official U.K. DMO dataset
* `gilt-export.csv`: script-cleaned version of official U.K. DMO dataset, selecting for
	* Conventional Gilts only (no index-linked Gilts)
	* Only auction sales (no outright issues)
	* Price is recorded (no missing data)
* `isin-[ISIN CODE].tab`: historical secondary-market prices of Conventional Gilt with specified ISIN code

### Data format

The official U.K. DMO Conventional Gilt data files have the following structure:

* `isin_code`: Conventional Gilt ISIN code (unique identifier)
* `sale_date`: date on which the auction was run
* `clean_price`: primary market price
* `issue_yield`: market yield
* `issue_size`: value of Gilts sold
* _additional unused columns_

The historical ISIN price files have the following structure:

* `Close of business date`: date on which the price is measured
* `ISIN`: Conventional Gilt ISIN code (unique identifier)
* `Clean Price`: secondary market clean price (without accrued interest)
* `Dirty Price`: secondary market dirty price (with accrued interest)
* `Yield`: secondary market yield
* _additional unused columns_

## Code

* `UK primary-secondary split.ipynb`: iPython notebook to clean data and generate statistics
	* Cleans official U.K. DMO dataset (produces `gilt-export.csv`)
	* Loads historical secondary market prices for each Conventional Gilt in the cleaned dataset
	* Derives summary statistics

## Usage

The iPython notebook (`UK primary-secondary split.ipynb`) will run on any machine with iPython and standard scientific/statistical packages installed (`numpy`, `pandas`). Full execution takes less than a minute.

_Note. The notebook expects data files to be in the subdirectory `./data-uk/`. This is adjustable in the first cell of the notebook, via `data_directory = '...'`._